package org.fanjr.simplify.rest.model;

import java.lang.reflect.Method;

/**
 * 
 * @author fanjr@vip.qq.com
 * @since 20190222 10:29:28
 */
public class SimplifyMappingModel {

	public final String path;
	public final Object handler;
	public final Method method;

	public SimplifyMappingModel(String path, Object handler, Method method) {
		this.handler = handler;
		this.method = method;
		this.path = path;
	}

	@Override
	public boolean equals(Object obj) {
		if (null != obj && obj.getClass() == SimplifyMappingModel.class) {
			return this.path.equals(((SimplifyMappingModel) obj).path);
		}
		return false;
	}

	@Override
	public int hashCode() {
		return path.hashCode();
	}
}